package zozopo.business.ad;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import zozopo.operations.business.StoreTB;
import zozopo.operations.business.ad.GoodsOS;
import zozopo.operations.business.ad.GoodsTB;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;

public class PreModifyGoodsAction extends ActionSupport implements Action,SessionAware{
private Map<Object, Object> session;
	
	private int id;
	
	private GoodsTB goods;
	
	public String execute(){
		GoodsOS goodsOS = new GoodsOS();
		
		goods = goodsOS.getGoodsById(id);
		
		goodsOS.releaseConnection();
		return SUCCESS;
	}
	
	public void setSession(Map arg0) {
		// TODO Auto-generated method stub
		session = arg0;
	}

	public GoodsTB getGoods() {
		return goods;
	}

	public void setGoods(GoodsTB goods) {
		this.goods = goods;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
}
